from datetime import timedelta
import os

os.umask(0o002)

DB_URL = 'postgresql://{{ distgit_pagure_db_ro_user }}:{{ distgit_pagure_db_ro_pass }}@{{ distgit_pagure_db_host }}/{{ distgit_pagure_db_name }}'

WEBHOOK = True
### Folder containing to the git repos
GIT_FOLDER = '/srv/git/repositories'

### Folder containing the docs repos
DOCS_FOLDER = None

### Folder containing the pull-requests repos
REQUESTS_FOLDER = '/srv/git/repositories/requests'

### Folder containing the tickets repos
TICKETS_FOLDER = None

### Folder containing the clones of the remotes git repo
REMOTE_GIT_FOLDER = '/srv/git/remotes'

### Folder where to run gl-compile-conf from
GITOLITE_HOME = '/srv/git/'

### Configuration file for gitolite
GITOLITE_CONFIG = '/srv/git/.gitolite/conf/gitolite.conf'

### File to include at the top of the gitolite configuration file
GITOLITE_PRE_CONFIG = '/var/tmp/gitolite-prefix.txt'

### Temp folder to be used to make the clones to work around bug in libgit2:
## refs: https://github.com/libgit2/libgit2/issues/2965
## and   https://github.com/libgit2/libgit2/issues/2797
TMP_FOLDER = '/srv/tmp'

REDIS_HOST = '0.0.0.0'
REDIS_PORT = 6379
REDIS_DB = 0

# Configuration item that are specific for this odd pagure instance
CASE_SENSITIVE = True

PROJECT_TICKETS = False
ENABLE_NEW_PROJECTS = True
ENABLE_DEL_PROJECTS = False
ENABLE_DEL_FORKS = True
ENABLE_TICKETS = False
ENABLE_GROUP_MNGT = False
DEPLOY_KEY = False
LOCAL_SSH_KEY = False
ALLOW_DELETE_BRANCH = False

DISABLED_PLUGINS = ['IRC', 'Pagure tickets', 'Read the Doc']

GITOLITE_BACKEND = 'distgit'
GITOLITE_CELERY_QUEUE = 'gitolite_queue'

BLACKLISTED_GROUPS = ['forks', 'group']
